C++ Program to Check String is Containing Only Digits
Prerequisite: Strings in C++...
read more
C++ String to Float/Double and Vice-Versa
In this article, we will learn how to convert String To Float/Double And Vice-Versa. In order to do conversion we will be using the following C++ functions:...
read more
Find uncommon characters of the two strings | Set 2
Given two strings, str1 and str2, the task is to find and print the uncommon characters of the two given strings in sorted order without using extra space. Here, an uncommon character means that either the character is present in one string or it is present in the other string but not in both. The strings contain only lowercase characters and can contain duplicates....
read more
First and Last Three Bits
Given an integer N. The task is to print the decimal equivalent of the first three bits and the last three bits in the binary representation of N.Examples:...
read more
Increment a number without using ++ or +
The task is to Increment a number without using ++ and + operators.Examples:...
read more
How to Access Elements of a Pair in C++?
In C++, a pair container is defined in <utility> header that can store two values that may be of different data types so as to store two heterogeneous objects as a single unit. In this article, we will learn how to access elements of a pair in C++....
read more
How to Copy a Vector to an Array in C++?
In C++, vectors are dynamic arrays that can grow and reduce in size as per requirements. Sometimes, we may need to copy the contents of a vector to the POD array. In this article, we will learn how to copy a vector to an array in C++....
read more
How to Access Vectors from Multiple Threads Safely?
In C++, a thread is a basic element of multithreading that represents the smallest sequence of instructions that can be executed independently by the CPU. In this article, we will discuss how to access a vector from multiple threads safely in C++....
read more
How to Access Value in a Map Using Iterator in C++?
In C++, a map is a container that stores elements in the form of a key value and a mapped value pair. In this article, we will learn how to access a value in a map using an iterator in C++....
read more
How to Concatenate Two Sets in C++?
In C++, sets are the data containers that store the unique elements in some specified order. Concatenating two sets means merging the elements of two sets into the first set. In this article, we will learn how to concatenate two sets in C++ STL....
read more
How to Read a Line of Input Text in C++?
In C++, we often need to take input from the user by reading an input text line by line but the cin method only takes input till whilespace. In this article, we will look at how to read a full line of input in C++....
read more
When to Use Virtual Destructors in C++?
In C++, destructors are special members of a class that frees memory occupied by an object when it goes out of scope. A virtual destructor is a special form of destructor that is declared as virtual in a base class....
read more